package com.platform.modules.mall.activity.entity.bo;

import com.platform.common.exception.BusinessException;

public class ActivityResultStatus {

        public static BusinessException buildException(Status status){
            return new BusinessException(status.getMsg(),status.getCode());
        }

        public enum Status{

            ACTIVITY_DATE_NOT(2,"不在活动期限内")
            ,NOT_WHITE_LIST(3,"不在活动白名单内")
            ,NOT_WHITE_LIST_NUMBER(4,"白名单数量不足")
            ,NO_PHONE(7,"请绑定手机号码")
            ,SUCCESS_RECEICE(10,"已经领取成功")
            ,ORDER_PAY_NO(11,"有未支付订单")
            ,GOODS_NUMBER_BUZHU(20,"商品库存不足")
            ,GOODS_NOT(21,"奖池已抽完")
            ;
            private Integer code;
            private String msg;

            Status(Integer code,String msg){
                this.code=code;
                this.msg=msg;
            }

            public Integer getCode() {
                return code;
            }
            public String getMsg() {
                return msg;
            }

        }

}
